function out_bool = in_square(in_y,in_x,xmi,xma,ymi,yma)
    if  ymi <= in_y  && in_y <= yma  && xmi <= in_x && in_x<= xma
        out_bool = 1;
    else
        out_bool = 0;
    end 
end